package Thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t=new Thread(){
          public void run(){
            String name=this.getName();
              System.out.println(name);

              long id=this.getId();
              System.out.println(id);

              int priority =this.getPriority();//获取线程优先级
              System.out.println(priority);

              boolean inInterrupted=this.isInterrupted();//线程是否中断
              boolean idDaemon=this.isDaemon();//是否守护线程
              boolean isAlive=this.isAlive();//线程是否还活着
          }
        };
        t.start();
    }
}
